<extend name="Public/base"/>

<block name="body">
  <div class="main-title">
    <h2>{$meta_title}</h2>
  </div>
    <div class="cf">
    <div class="fl">
      <a class="btn" href="{:U('create')}">新 增</a> </if>
      <button class="btn ajax-post confirm" target-form="ids" url="{:U("WechatQrcode/setStatus",array("status"=>-1))}">删 除</button>
    </div>

    <!-- 高级搜索 -->
  <include file="serch" />

    <!-- 数据表格 -->
    <div class="data-table">
    <table class="">
    <thead>
        <tr>
    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
    <th class="">编号</th>
    <th class="">二维码</th>
    <th class="">场景</th>
    <th class="">扫描次数</th>
    <th class="">关注人数</th>
    <th class="">回复类型</th>
    <th class="">回复内容</th>
    <th class="">创建日期</th>
    <th class="">操作</th>
    </tr>
    </thead>
    <tbody>
    <volist name="_list" id="vo">
    <tr>
      <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
      <td>{$vo.id} </td>
        <td><img src="{$vo.qrpic}" width="50px" alt="二维码"/></td>
      <td><span>{$vo.scene}</span></td>
      <td><span>{$vo.scan_num}</span></td>
      <td>{$vo.id|get_scan_sub_count}</td>
      <td>{$vo.flow_id_text}</td>
      <td>{$vo.action_data}</td>
      <td><span>{$vo.create_time|time_format}</span></td>
      <td>
          <p class="btn-group">
              <a href="{:U('showQrcode?id='.$vo['id'])}" class="btn btn-default">预览</a>
              <a href="{:U('create?id='.$vo['id'])}" class="btn btn-primary">编辑</a>
              <a href="{:U('setStatus?ids='.$vo['id'].'&status=-1')}" class="btn btn-danger confirm ajax-get">删除</a>
          </p>
      </td>
    </tr>
    </volist>
  </tbody>
    </table>
        <div id="imgShowBox" class="hidden" style="position: absolute;top:200px;left:40%"></div>
  </div>

  <!-- 分页 -->
    <div class="page">
        {$_page}
    </div>

</block>

<!-- 加载底部JS -->
<block name="script">
<include file="Public/footjs" />
    <script>
        $("td img").hover(function(){
            var src = $(this).attr('src');
            var img = '<img src="'+src+'" width="250px" />';
            $("#imgShowBox").toggleClass('hidden').empty().html(img);
        });
    </script>
</block>